.TH std::chrono::year_month_day_last::year,std::chrono::year_month_day_last::month, 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::chrono::year_month_day_last::year,std::chrono::year_month_day_last::month, \- std::chrono::year_month_day_last::year,std::chrono::year_month_day_last::month,

.SH Synopsis

   constexpr std::chrono::year year() const noexcept;                 \fB(1)\fP \fI(since C++20)\fP
   constexpr std::chrono::month month() const noexcept;               \fB(2)\fP \fI(since C++20)\fP
   constexpr std::chrono::day day() const noexcept;                   \fB(3)\fP \fI(since C++20)\fP
   constexpr std::chrono::month_day_last month_day_last() const       \fB(4)\fP \fI(since C++20)\fP
   noexcept;

   Retrieves the field values stored in this year_month_day_last object.

.SH Return value

   1) Returns the stored std::chrono::year value.
   2) Returns the stored std::chrono::month value.
   3) A std::chrono::day value corresponding to the last day of the stored year and
   month. If this->ok() is false, the return value is unspecified.
   4) A std::chrono::month_day_last constructed from month().

.SH Example


// Run this code

 #include <chrono>

 int main()
 {
     constexpr auto ymdl{std::chrono::last/11/2020};
     static_assert
     (
         ymdl.day() == std::chrono::day(30) &&
         ymdl.month() == std::chrono::November &&
         ymdl.year() == std::chrono::year(2020) &&
         ymdl.month_day_last() == std::chrono::November/std::chrono::last
     );
 }
